package utils

import (
	"encoding/binary"
)

func NetOutPackUint16(rawData []byte) []byte {
	n := len(rawData)
	data := make([]byte, 0, n+2)

	data = binary.BigEndian.AppendUint16(data, uint16(n))
	// fmt.Println("NetOutPackUint16 n=", n, " data=", data)
	data = append(data, rawData...)
	// fmt.Println("NetOutPackUint16 data=", data)

	return data

}
